// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * WidgetInstance generated by hbm2java
 */
@Entity
@Table(name = "widget_instance", catalog = "magento")
public class WidgetInstance implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private Integer instanceId;
	private String instanceType;
	private String packageTheme;
	private String title;
	private String storeIds;
	private String widgetParameters;
	private short sortOrder;
	private Set widgetInstancePages = new HashSet(0);

	public WidgetInstance() {
	}

	public WidgetInstance(String storeIds, short sortOrder) {
		this.storeIds = storeIds;
		this.sortOrder = sortOrder;
	}

	public WidgetInstance(String instanceType, String packageTheme,
			String title, String storeIds, String widgetParameters,
			short sortOrder, Set widgetInstancePages) {
		this.instanceType = instanceType;
		this.packageTheme = packageTheme;
		this.title = title;
		this.storeIds = storeIds;
		this.widgetParameters = widgetParameters;
		this.sortOrder = sortOrder;
		this.widgetInstancePages = widgetInstancePages;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "instance_id", unique = true, nullable = false)
	public Integer getInstanceId() {
		return this.instanceId;
	}

	public void setInstanceId(Integer instanceId) {
		this.instanceId = instanceId;
	}

	@Column(name = "instance_type")
	public String getInstanceType() {
		return this.instanceType;
	}

	public void setInstanceType(String instanceType) {
		this.instanceType = instanceType;
	}

	@Column(name = "package_theme")
	public String getPackageTheme() {
		return this.packageTheme;
	}

	public void setPackageTheme(String packageTheme) {
		this.packageTheme = packageTheme;
	}

	@Column(name = "title")
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "store_ids", nullable = false)
	public String getStoreIds() {
		return this.storeIds;
	}

	public void setStoreIds(String storeIds) {
		this.storeIds = storeIds;
	}

	@Column(name = "widget_parameters", length = 65535)
	public String getWidgetParameters() {
		return this.widgetParameters;
	}

	public void setWidgetParameters(String widgetParameters) {
		this.widgetParameters = widgetParameters;
	}

	@Column(name = "sort_order", nullable = false)
	public short getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(short sortOrder) {
		this.sortOrder = sortOrder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "widgetInstance")
	public Set getWidgetInstancePages() {
		return this.widgetInstancePages;
	}

	public void setWidgetInstancePages(Set widgetInstancePages) {
		this.widgetInstancePages = widgetInstancePages;
	}

}
